<?php
    $mipath='../';
	include ('../inc/config.php');

    $producto_id = $_SESSION['login'];
    if($producto_id==0){
        die();
    }

    $ubicacion = request('ubicacion','T');

    $sql = "select * from planes where LEFT(ubicacion,1)='$ubicacion' and importe>0 order by ubicacion ASC";
    $rs  = $db->Execute($sql);
    $Planes = $rs->GetRows();
?>
        <style type="text/css">
            .row{
                font-family: 'Arial','sans-serif';
                font-color: #CCC;
                font-size:12px;
                height:20px;
                line-height:20px;
            }
            .titulo{
                background:#84A8FC;
                font-family: 'Arial','sans-serif';
                font-color: #000;
                font-size:14px;
            }
            .celda{
                font-family: 'Arial','sans-serif';
                font-color: #000;
                font-size:12px;
                padding:3px;
            }    
        </style>
        <link rel="stylesheet" href="<?php echo URL;?>/css/formularios.css" type="text/css" media="screen" />

        <center>
            <form action='<?php echo URL;?>/pasarelas/destacar_anuncio.php' method='post' name='form1' id='form1' target='_parent'>
                <table cellspacing='0' width='380' style='border:1px solid #84A8FC;'>
                    <tr class='titulo'>
                        <td style='text-align:center;' class='celda'>PLAN</td>
                        <td style='text-align:center;' class='celda'>VIGENCIA</td>
                        <td style='text-align:center;' class='celda'>PRECIO</td>
                    </tr>
                <?php $check = 'checked';?>
                <?php foreach($Planes as $p){?>
                    <tr class='row'>
                        <td>
                            <input type='radio' name='plan_id' value='<?php echo $p['id'];?>'  <?php echo $check;?> >
                            <?php $check = '';?>
                            &nbsp;&nbsp;
                            <?php echo $p['plan'];?>
                        </td>
                        <td style='text-align:center;'><?php echo $p['vigencia'];?>días</td>
                        <td style='text-align:center;'><?php echo '$'.number_format($p['importe'],0);?>.-</td>
                    </tr>
                <?php } //end foreach?>
                </table>
                <div class='celda'>
                Seleccione la forma de Pago:
                    <select name='forma_de_pago' >
                        <option value='1' > Transferencia Bancaria</option>
                        <option value='2' > MercadoPago y/o Tarjeta de Credito</option>
                        <option value='3' > DineroMail  y/o Tarjeta de Credito</option>
                        <option value='4' > PagoFacil / Rapipago</option>                        
                        <option value='5' > Paypal</option>
                    </select>
                </div>
                <input type='submit' name='enviar' id='enviar' value='Comprar' title='Comprar' style='width:200px;'>
            </form>
        </center>
